﻿#ifndef REGIONSCANFORM_H
#define REGIONSCANFORM_H

#include <QWidget>
#include <qmath.h>

#include "taskeditor.h"
namespace Ui {
class RegionScanForm;
}

class RegionScanForm : public QWidget, public TaskEditor
{
    Q_OBJECT

public:
    explicit RegionScanForm(QWidget *parent = 0);
    ~RegionScanForm();

private:
    Ui::RegionScanForm *ui;
    enum TableCol
    {
        Table_Name = 0,
        Table_EWStart,
        Table_EWEnd,
        Table_NSStart,
        Table_NSEnd,
        Table_STime,
        Table_MidTime,
        Table_ETime,
        Table_TotTime,
    };

    // TaskEditor interface
public:
    void generateTask(TaskItem *pTask);
    void setCurrentTask(const QString &sName);
    void setCurrentMode(int nMode);
    void updateTask(TaskItem *pTask);

private slots:
    void on_pushButton_CalPos_clicked();
    void on_pushButton_AddCycle_clicked();
    void on_pushButton_DeCycle_clicked();
    void on_comboBox_TimeAlign_currentIndexChanged(int index);
    void on_tableWidget_currentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn);
};

#endif // REGIONSCANFORM_H
